Skip to content

Package the ground station for release: Windows and macOS bundles, release workflow - #61

Open
yassinsolim wants to merge 6 commits into
fix/windows-carrier-detectfrom
feature/release-packaging
Open

yassinsolim wants to merge 6 commits into
fix/windows-carrier-detectfrom
feature/release-packaging

Conversation

@yassinsolim

@yassinsolim yassinsolim commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Packages the ground station so a Windows or Mac user can start the arm by double-clicking, and gives the software leads a safe way to publish it. Stacked on #59 (and so #57), which hold the launchers it packages; when they merge with a merge commit and their branches are deleted, GitHub retargets this to main.

What it adds

  • Windows bundle (waybionic-ground-station-windows-<version>.zip): the launcher scripts, the host-side bridges and only the modules they import, an embedded Python with pyserial, and compose.release.yaml: the wslg-arm service from compose.yaml, generated rather than copied so they cannot drift, run from the tested image pinned by digest. Docker Desktop is the only prerequisite (no Python, no build). Double-click Start WayBionic Arm.cmd; Check WayBionic Setup.cmd checks the laptop and starts nothing.
  • macOS bundle (waybionic-ground-station-macos-<version>.zip): the source at the tag plus Install WayBionic.command, which copies it to ~/WayBionic (the app starts the station from a folder, so it must not live in Downloads) and installs the app. The Mac app runs ROS natively, so the first start still sets up the environment (30 to 60 minutes, once); nothing prebuilt can be shipped.
  • windows-arm.ps1 now prefers python\python.exe beside it, runs the pinned image without building, pulls it first (with a message for "unauthorized"), takes -SelfTest, and does the cheap checks before starting Docker Desktop. From a checkout it behaves as before.
  • .github/workflows/release.yml: a tag vX.Y.Z builds the bundles, checks them on Windows and macOS runners, writes SHA256SUMS, attests where the files came from, tags the image and drafts a GitHub Release. A lead publishes the draft.
  • README "Run the real arm", docs/RELEASING.md (one-time setup, cutting a release, undoing one, updating the pins) and docs/handover.md (what has been shown to work and how, the known problems, what to check next).
  • test_macos_app.py is now registered with colcon. It was linted but never run in CI; it passes in the CI image.

Why it is safe

  • Only reviewed, tested code is released. The tag must be on a commit that is an ancestor of main and must already have an image from main's CI. The release re-tags that image by digest instead of rebuilding it, the Windows bundle names the digest, and an existing version tag with another digest is an error.
  • Pinned and verified inputs. The embedded Python is pinned by SHA-256, and that zip is the one python.org signs with Sigstore as hugo@python.org (I verified it with sigstore verify identity when making the pin; the steps to repeat it are in RELEASING.md). pyserial is installed with --require-hashes. The Windows runner also checks that python.exe is signed by the Python Software Foundation. Actions are pinned by commit.
  • Downloads can be checked: SHA256SUMS and build attestations (gh attestation verify). The zips are reproducible: the same inputs give the same bytes.
  • Least permissions per job; the release is a draft, so nothing is public until someone publishes it. Pull requests and manual runs do a dry run that publishes nothing.

How it was tested

  • Built the Windows bundle with the real Python zip, hash-enforced pyserial and the repo's compose.yaml; docker compose -f compose.release.yaml config accepts it with the digest pinned and nothing to build; two builds are byte-identical.
  • Built the macOS bundle from git archive and ran its installer in a throwaway HOME: it copied to ~/WayBionic/ground-station-<version>, installed the app, stamped the version and pointed the app at the copy.
  • test_release_bundles.py (12 tests) and test_macos_app.py pass in the CI image; ament_flake8 and ament_pep257 are clean; actionlint (with shellcheck) is clean on both workflows; windows-arm.ps1 parses in PowerShell 7.
  • This PR touches packaging/, so the release workflow's dry run runs on it: the Windows job unpacks the bundle and runs its self-test under Windows PowerShell 5.1, and the macOS job checks the installer and the app. See the checks below.

Not tested, and what to do about it

  • The publishing path (the release job: the ancestor and image checks, the image tag, attestations and the draft) cannot run without a tag. After this merges, make the first release a candidate, for example v0.1.0-rc1, so a pre-release draft and an image tag are the only things at stake. RELEASING.md has the steps.
  • Nobody has run the Windows bundle on a laptop with the arm, and Make windows-arm.cmd find the carrier or say why it cannot #59's launcher changes have not either; CI covers the unpack, the parse and the self-test, not Docker Desktop or the carrier.
  • The two one-time settings are done (14 November 2026; RELEASING.md, "One-time setup"). The waybionic_ground_station package is public: an anonymous client gets a token, pulls the :jazzy manifest (linux/amd64 and linux/arm64) and downloads a layer, so a Windows laptop no longer needs docker login. That needed the organisation's Package creation > Public policy switched on for a minute, because the package page greys out Public otherwise; it is switched off again, so the organisation policy is unchanged and only this package is public. And a tag ruleset, "Protect release tags", lets only the maintainers team create, move or delete v* tags ("Protect main" is untouched). RELEASING.md now says all of this, which it did not before.
  • Windows on ARM and Intel Macs are not built. There is no code signing or notarisation, so the first run of Install WayBionic.command needs a right-click, Open on macOS.

test_macos_app.py was linted by ament but never registered with colcon, so
CI never ran it. It passes in the CI image, so register it like the other
bringup tests.
In a release bundle the folder holds its own Python and compose.release.yaml,
which runs the tested image by digest, so the script now:
- prefers python\python.exe beside it to a Python on the PATH;
- runs `docker compose -f compose.release.yaml run` with no --build, and pulls
  the image first with a message that says what to do if it is unauthorized;
- takes -SelfTest, which checks Docker, Python, pyserial and that the bridges
  import, and starts nothing.
From a checkout it behaves as before. The cheap checks (Python, pyserial) now
come before starting Docker Desktop, which can take minutes, so a missing
Python is reported at once.
packaging/make_bundles.py builds two reproducible zips (the same inputs give
the same bytes):

- Windows: the launcher scripts, the host-side bridges and the modules they
  import, an embedded Python with pyserial, and compose.release.yaml, which is
  the wslg-arm service from compose.yaml run from the tested image pinned by
  digest. Docker Desktop is the only prerequisite. The bundle fails to build if
  a bridge imports anything it does not carry, or if the image is not pinned
  by digest.
- macOS: the source at the tag, with Install WayBionic.command, which keeps a
  copy in ~/WayBionic and installs the app, and the version stamped in the app.

The embedded Python and pyserial are pinned by hash: the Python zip is the one
python.org signs with Sigstore as hugo@python.org (verified when the pin was
made), and pyserial is installed with --require-hashes.

The tests cover the compose file, the pin, the bridge imports, the bundle
contents (ASCII PowerShell, CRLF text, the _pth file), reproducibility and the
macOS stamping.
Pushing a tag vX.Y.Z builds the bundles, checks them on Windows and macOS
runners, writes SHA256SUMS, attests where the files came from, tags the image
and drafts a GitHub Release. A lead publishes the draft; nothing is public
before that.

The release is only of a commit on main that has an image CI already tested:
the workflow re-tags that image by digest instead of rebuilding it, pins the
Windows bundle to the digest, and never moves a version tag that exists. Pull
requests that touch the packaging, and manual runs, build and test the same
bundles without publishing anything. Actions are pinned by commit.
README: a "Run the real arm" section that leads with the release bundles for
Windows and macOS, ahead of the developer quick start.

docs/RELEASING.md: the one-time setup (a public image, restricting who can
tag), cutting a release with a dry run and a checklist, what the workflow
guarantees, undoing a bad release, and updating the pinned Python, pyserial
and actions.

docs/handover.md: what has been shown to work and how, what has not (the
motion modes, the CAD joint limits and the E-stop on the real arm), the known
problems, what to check before relying on each, the hardware facts that cost
time to find, and the code conventions CI enforces.
Copilot AI balanced review requested due to automatic review settings November 14, 2026 12:23
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05df7c3e-3a20-4d1b-909c-e554688cb652

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical release workflow defects can prevent draft release creation and allow existing immutable image versions to be overwritten when registry lookups fail.

3 open issues
What changed in this PR

Packages the existing ground-station launchers into Windows and macOS release bundles and adds a workflow for validating them and drafting releases.

Changes:

  • Adds reproducible bundles with embedded Python and a digest-pinned image on Windows, and a source installer on macOS.
  • Adds platform checks, checksums, build attestations, and a tag-driven release workflow.
  • Documents installation and release procedures, and registers bundle and Mac app tests with colcon.
File Description
waybionic_bringup/​test/​test_release_bundles.py Tests bundle contents, image pins, and reproducibility.
waybionic_bringup/​package.xml Adds the YAML test dependency.
waybionic_bringup/​CMakeLists.txt Registers Mac app and bundle tests.
scripts/​windows-arm.ps1 Supports bundled Python, pinned images, and self-tests.
README.md Adds release-download and real-arm startup instructions.
packaging/​windows/​Start WayBionic Arm.cmd Adds the double-click arm launcher.
packaging/​windows/​requirements.txt Pins pyserial with a hash.
packaging/​windows/​README.txt Documents Windows bundle setup and troubleshooting.
packaging/​windows/​python-embed.json Records embedded Python pins and verification metadata.
packaging/​windows/​Check WayBionic Setup.cmd Adds the double-click prerequisite check.
packaging/​make_bundles.py Builds reproducible Windows and macOS archives.
packaging/​macos/​README.txt Documents Mac bundle installation and use.
packaging/​macos/​Install WayBionic.command Copies the source into place and installs the app.
docs/​RELEASING.md Documents release setup, publishing, and recovery.
docs/​handover.md Records validation status, known gaps, and follow-up checks.
.github/​workflows/​release.yml Builds and checks bundles, attests assets, and drafts releases.

Review effort: Balanced

Comment on lines +285 to +286
existing=$(docker buildx imagetools inspect "$IMAGE:v$VERSION" \
--format '{{json .Manifest.Digest}}' 2>/dev/null | tr -d '"' || true)
Comment on lines +322 to +323
gh release create "$GITHUB_REF_NAME" dist/*.zip dist/SHA256SUMS \
--title "WayBionic Ground Station $VERSION" "${flags[@]}"

What you need
- An Apple Silicon Mac on macOS 13 or newer. Intel Macs are untested.
- About 10 GB of free disk space and an internet connection for the first start.
Making the image public turned out to need more than the package page: its
Public option is greyed out ("Setting is disabled by organization
administrators") until the organisation's Packages policy allows public
packages. RELEASING.md did not say so, so whoever recreated the package would
have been stuck. It now gives the steps in order, including switching the
policy off again afterwards, and a check that needs no login.

It also says that the image is public and that the "Protect release tags"
ruleset exists (both done on 14 November 2026), and handover.md lists the
repository settings changed at the handover, so the new leads know what state
the repository is in.
@yassinsolim
yassinsolim force-pushed the feature/release-packaging branch from b99a410 to bd863c4 Compare November 14, 2026 22:41
@yassinsolim
yassinsolim force-pushed the fix/windows-carrier-detect branch from 224a119 to 899863b Compare November 14, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants